/**
 *
 * @author Erivaldo Lourenco
 * @author Juliana Cavalcanti
 * 
 */

package br.ufal.ic.p3.dao;

import java.beans.Statement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;

public class DaoUtilidades {

	public Connection getConection() throws SQLException {

		Connection conn = null;
		conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/prognet_beta", "root","juuh18190193");
		return conn;
	}

	public void release(java.sql.Statement stmt) {
		if (stmt == null)
			return;

		try {
			stmt.close();
		} catch (SQLException e) {
		}
	}

	public void release(Connection conn) {
		if (conn == null)
			return;

		try {
			conn.close();
		} catch (SQLException e) {
		}
	}

	public void release(ResultSet rst) {
		if (rst == null)
			return;

		try {
			rst.close();
		} catch (SQLException e) {
		}
	}
	
}
